package com.shop.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shop.common.typeHandler.QuestionOptionsTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@ApiModel("试题实体")
@TableName(autoResultMap = true)
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Integer id;

    @ApiModelProperty(value = "类型")
    private Integer type;

    @ApiModelProperty(value = "分类ID")
    private Integer categoryId;

    @ApiModelProperty(value = "题干")
    private String title;

    @ApiModelProperty(value = "选项")
    @TableField(typeHandler = QuestionOptionsTypeHandler.class)
    private List<QuestionOption> options;

    @ApiModelProperty(value = "解释")
    private String explanation;

    @ApiModelProperty(value = "关键词")
    private String keywords;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    @ApiModelProperty(value = "更新时间")
    private Long updateTime;

    @ApiModelProperty(value = "是否删除")
    private Integer isDelete;

    @ApiModelProperty(value = "删除时间")
    private Long deleteTime;

}